package com.primb.bench.project.home.contract;

import android.content.Intent;

import com.primb.baselibs.base.BasePresenter;
import com.primb.bench.project.approval.entity.NextPersonEntity;
import com.primb.bench.project.home.entity.ApplyNextUserEntity;
import com.primb.bench.project.home.entity.ClientInfoEntity;
import com.primb.bench.project.home.entity.EnsureInfoEntity;
import com.primb.bench.project.home.entity.HttpApplyResultEntity;
import com.primb.bench.project.home.entity.HttpCheckProEntity;
import com.primb.bench.project.home.entity.HttpLogoEntity;
import com.primb.bench.project.home.entity.HttpResultEntity;
import com.primb.bench.project.home.entity.HttpStrEntity;
import com.primb.bench.project.home.entity.LoanCalculateInfoEntity;
import com.primb.bench.project.home.entity.LoanInfoEntity;
import com.primb.bench.project.home.entity.LogoInfoEntity;
import com.primb.bench.project.home.entity.PromiseApplyEntity;
import com.primb.bench.project.home.entity.TaxInfoEntity;
import com.primb.netlibs.entity.HttpResultResponse;

import rx.Observable;


/**
 * Created by Chen on 2017/5/4.
 * 功能描述：
 */

public class LoanCalculateContract {
    public interface View {
        void showResultView(HttpResultEntity.DataBean bean);

        void hideResultView();

        void showLoading();

        void hideLoading();

        void showError(String msg);

        void resetView();

        void showApplyView();

        void intentToAddInfo(int requestCode);

        void intentToMain();

        void intentToPromise(int requestCode);

        void intentToParameter(HttpResultEntity.DataBean bean);

        void intentToPromiseList();

        void showCustomerAddInfo();

        void showCustomerInfo();

        void changeCustomerInfo();

        void showLoanInfo();

        void showEnsureInfo();

        void showTaxInfo();

        void setInfoToLogo(LogoInfoEntity entity);

        void setInfoToCustomer(ClientInfoEntity entity);

        void setInfoToLoan(LoanInfoEntity entity);

        void setInfoToEnsure(EnsureInfoEntity entity);

        void setInfoToTax(TaxInfoEntity entity);

        void getInfoToTax(TaxInfoEntity entity);

        void setInfoToPromise(PromiseApplyEntity entity);

        void hidePromiseInfo(PromiseApplyEntity infoEntity);

        void showCalculateInfo(LoanCalculateInfoEntity entity);

        void closeTaxEdit();

        void closePromiseEdit();

        boolean getApplyInfo(PromiseApplyEntity entity);

        void showPersonList(ApplyNextUserEntity entity);

        void showOverDialog(boolean isOver);

    }

    public interface Presenter extends BasePresenter {
        void getLogoInfo();

        void setLogoType(String type, String priceType);

        void getResultForAddInfo(int requestCode);

        void saveResult();

        void getCalculateResult(LoanCalculateInfoEntity infoEntity);

        void handleResultInfo(int requestCode, int resultCode, Intent data);

        void onViewClick(int viewId, boolean isShowResult);

        void getCalculateApplyRate(LoanCalculateInfoEntity infoEntity);

        void getApplyRateOnProcess(LoanCalculateInfoEntity infoEntity);

        void submitNextPerson(NextPersonEntity bean);

        void checkPromise(String custId);

    }

    public interface Model {
        Observable<HttpLogoEntity> getLogoInfo();

        Observable<HttpResultEntity.DataBean> getLoanCalculate(LoanCalculateInfoEntity infoEntity);

        Observable<HttpStrEntity> deletePromiseInfo(String priceId);

        Observable<ApplyNextUserEntity> getCalculateApplyRate(LoanCalculateInfoEntity infoEntity);

        Observable<HttpStrEntity> getApplyRateNoProcess(LoanCalculateInfoEntity infoEntity);

        Observable<HttpApplyResultEntity> submitNextPerson(LoanCalculateInfoEntity infoEntity, NextPersonEntity bean);

        Observable<HttpStrEntity> saveResult(LoanCalculateInfoEntity infoEntity);

        Observable<HttpCheckProEntity> checkPromise(String custId);
    }

}